home *** CD-ROM | disk | FTP | other *** search
/ Freelog 115 / FreelogNo115-MaiJuin2013.iso / Internet / Filezilla Server / FileZilla_Server-0_9_41.exe / source / AdminSocket.h < prev    next >
C/C++ Source or Header  |  2011-11-06  |  2KB  |  68 lines

  1. // FileZilla Server - a Windows ftp server
  2.  
  3. // Copyright (C) 2002-2004 - Tim Kosse <tim.kosse@gmx.de>
  4.  
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU General Public License
  7. // as published by the Free Software Foundation; either version 2
  8. // of the License, or (at your option) any later version.
  9.  
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14.  
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  18.  
  19. // AdminSocket.h: Schnittstelle fⁿr die Klasse CAdminSocket.
  20. //
  21. //////////////////////////////////////////////////////////////////////
  22.  
  23. #if !defined(AFX_ADMINSOCKET_H__C8A04733_3DF9_41C9_B596_DCDE8246AE88__INCLUDED_)
  24. #define AFX_ADMINSOCKET_H__C8A04733_3DF9_41C9_B596_DCDE8246AE88__INCLUDED_
  25.  
  26. #if _MSC_VER > 1000
  27. #pragma once
  28. #endif // _MSC_VER > 1000
  29.  
  30. #include "AsyncSocketEx.h"
  31.  
  32. class CAdminInterface;
  33. class CAdminSocket : public CAsyncSocketEx  
  34. {
  35. public:
  36.     BOOL CheckForTimeout();
  37.     BOOL SendCommand(int nType, int nID, const void *pData, int nDataLength);
  38.     BOOL Init();
  39.     CAdminSocket(CAdminInterface *pAdminInterface);
  40.     virtual ~CAdminSocket();
  41.  
  42. protected:
  43.     BOOL FinishLogon();
  44.     BOOL SendCommand(LPCTSTR pszCommand, int nTextType);
  45.     CAdminInterface *m_pAdminInterface;
  46.     int ParseRecvBuffer();
  47.     virtual void OnReceive(int nErrorCode);
  48.     virtual void OnSend(int nErrorCode);
  49.     struct t_data
  50.     {
  51.         unsigned char *pData;
  52.         DWORD dwOffset;
  53.         DWORD dwLength;
  54.     };
  55.     std::list<t_data> m_SendBuffer;
  56.  
  57.     unsigned char *m_pRecvBuffer;
  58.     int m_nRecvBufferLen;
  59.     DWORD m_nRecvBufferPos;
  60.  
  61.     BOOL m_bStillNeedAuth;
  62.     unsigned char m_Nonce1[8];
  63.     unsigned char m_Nonce2[8];
  64.     FILETIME m_LastRecvTime;
  65. };
  66.  
  67. #endif // !defined(AFX_ADMINSOCKET_H__C8A04733_3DF9_41C9_B596_DCDE8246AE88__INCLUDED_)
  68.